﻿using FluentValidation;

namespace IdentityServer.Infrastructure.Validators
{
    public record LoginByUserNameAndPwdRequest(string UserName, string Password)
    {
    }
    public class LoginByUserNameAndPwdRequestValidator : AbstractValidator<LoginByUserNameAndPwdRequest>
    {
        public LoginByUserNameAndPwdRequestValidator()
        {
            RuleFor(x => x.UserName).NotNull().NotEmpty();
            RuleFor(x => x.Password).NotNull().NotEmpty();
        }
    }
}
